home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 134 < prev    next >
Internet Message Format  |  1996-08-06  |  1KB

  1. Path: stdc.demon.co.uk!clive
  2. From: clive@stdc.demon.co.uk (Clive D.W. Feather)
  3. Newsgroups: comp.std.c
  4. Subject: Re: atexit() and return from main()
  5. Date: Wed, 17 Jan 1996 18:41:52 GMT
  6. Organization: Demon Internet Limited (personal account)
  7. Message-ID: <DLC99u.8A2@stdc.demon.co.uk>
  8. References: <4dhfja$j50@fg70.rz.uni-karlsruhe.de>
  9. Reply-To: clive@demon.net
  10. X-NNTP-Posting-Host: stdc.demon.co.uk
  11.  
  12. In article <4dhfja$j50@fg70.rz.uni-karlsruhe.de>,
  13. Thomas Koenig <Thomas.Koenig@ciw.uni-karlsruhe.de> wrote:
  14. > Is the following valid C?
  15. [...]
  16. > 6.1.2.4 tells me it isn't, but 5.1.2.2.3 tells me that a return from the
  17. > initial call to main() is equivalent to an exit(), and I don't see a problem
  18. > when I replace the 'return 0' above with an 'exit(0)'.
  19.  
  20. See the "brief summary of TC2" thread. The "equivalent" has been amended
  21. by "except that main's local variables are available in the latter case
  22. and not the former".
  23.  
  24. -- 
  25. Clive D.W. Feather                       | If you lie to the compiler,
  26. clive@demon.net        (work, preferred) | it will get its revenge.
  27. clive@stdc.demon.co.uk (home)            |   - Henry Spencer
  28.